import useAuthStore from '../store/authStore';

const HomePage = () => {
  const { userInfo, logout } = useAuthStore();

  return (
    <div>
      <h1>欢迎来到创游工坊</h1>
      {userInfo ? (
        <div>
          <p>你好, {userInfo.username}!</p>
          <button onClick={logout}>退出登录</button>
        </div>
      ) : (
        <p>你当前是游客状态。</p>
      )}
    </div>
  );
};

export default HomePage;